FROM mysql:8.4.4

# 维护者信息
LABEL maintainer="kennylee <kennylee26@gmail.com>"

RUN cp -r /etc/yum.repos.d /etc/yum.repos.d.bak
COPY oracle-linux-9.repo /etc/yum.repos.d/oracle-linux.repo

# 安装常用工具
RUN microdnf clean all && microdnf makecache && \
    microdnf install -y curl unzip vim wget && \
    microdnf install -y glibc-langpack-zh && \
    microdnf clean all

# 支持中文
# RUN localectl set-locale LANG=zh_CN.UTF-8
# RUN source /etc/locale.conf
       
ENV LANG=zh_CN.UTF-8 \
    LC_ALL=zh_CN.UTF-8 \
    TZ=Asia/Shanghai

COPY my.cnf /etc/mysql/my.cnf
RUN mkdir -p /etc/mysql/mysql-my.conf.d/

EXPOSE 3306
CMD ["mysqld"]
